# Contributor: Holger Jaekel <holger.jaekel@gmx.de>
# Maintainer: Holger Jaekel <holger.jaekel@gmx.de>
pkgname=netcdf-fortran
pkgver=4.5.3
pkgrel=0
pkgdesc="NetCDF fortran bindings"
url="https://www.unidata.ucar.edu/software/netcdf/"
arch="all !armhf !armv7 !s390x !mips !mips64"  # disabling on armhf and armv7 as netcdf is not available
license="Apache-2.0"
makedepends="
	cmake
	doxygen
	gfortran
	graphviz
	m4
	netcdf-dev
	"
depends_dev="
	netcdf-dev
	"
subpackages="
	$pkgname-doc
	$pkgname-dev
	"
source="$pkgname-$pkgver.tar.gz::https://github.com/Unidata/netcdf-fortran/archive/v$pkgver.tar.gz"

build() {
	./configure \
		--prefix=/usr \
		--disable-static
	make
}

package() {
	make DESTDIR="$pkgdir" install
	rm -rf $pkgdir/usr/include/CMakeFiles
}

check() {
	make check
}
sha512sums="fe4b2f6f8c44bf4fdeebe3cbd57ee44ccee15a70075428bb68f0d33b70f9291b68b542965634a27fb4be5a59c756d672a3d264f2628391861edb98a244e072b4  netcdf-fortran-4.5.3.tar.gz"
